- Go to replicate.com
- Create an account
- Add your payment method
- Generate an API key
- Add the API key in the plugin tab on Bubble
- Use the functions in your workflows actions
For each action you will have the option to specify a webhook or not :
- If empty, the workflow will be blocked until the generation is completed. It can be used in client-side only on very fast model (because it timeout after 30s). It is advised to use them in backend workflow only.
- If a webhook is set, the action will return a prediction_id that you can use at later use. The webhook url specified will be called once the generation is completed.
To expose an API with URL to use as a Webhook you can check this tuto on YouTube (from 30min) :
https://youtu.be/T6zXcy5uLmI?si=GYlm3852Do2Yc0W4&t=1802Workflow :
- Create a new type in your BDD example : "Generated Images"
- Give it few fields like :
--- prompt
--- prediction_id
--- user
--- imgs
--- ...
- Add an input in your page and a button
- Add a workflow When the button element is clicked
- Add the action to create a faceswap and set the webhook :
- Add a backend workflow that will be the webhook when the prediction is completed
- In this backend workflow you will get the "Generated Images" thanks to the prediction_id that will be in the data returned to your webhook
- Make a change to the "Generated Images" found with the prediction_id and set it the list of the images returned to your webhook
- On your front-end add a repeating group to display the images of your "Generated Images"
Editor :
https://bubble.io/page?type=page&name=replicate-faceswap&id=vima-plugins-demo&tab=tabs-1any bug or suggestion, any model you'd like to see added ?
contact
[email protected]